package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Objects;

/**
 * 费用&维修配件服务明细表
 */
@Entity
@Table(name = "wei_detail", schema = "lxh_crm", catalog = "")
public class WeiDetail {
    private int weiDetailId;
    private Integer workordId;
    private Integer productId;
    private String standard;
    private Double weiPrice;
    private Integer weiCount;
    private Double weiDiscount;
    private Double weiTotal;
    private Double cosWeiTotal;
    private String remark;

    @Id
    @Column(name = "wei_detail_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getWeiDetailId() {
        return weiDetailId;
    }

    public void setWeiDetailId(int weiDetailId) {
        this.weiDetailId = weiDetailId;
    }

    @Basic
    @Column(name = "workord_id", nullable = true)
    public Integer getWorkordId() {
        return workordId;
    }

    public void setWorkordId(Integer workordId) {
        this.workordId = workordId;
    }

    @Basic
    @Column(name = "product_id", nullable = true)
    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Basic
    @Column(name = "standard", nullable = true, length = 40)
    public String getStandard() {
        return standard;
    }

    public void setStandard(String standard) {
        this.standard = standard;
    }

    @Basic
    @Column(name = "wei_price", nullable = true, precision = 0)
    public Double getWeiPrice() {
        return weiPrice;
    }

    public void setWeiPrice(Double weiPrice) {
        this.weiPrice = weiPrice;
    }

    @Basic
    @Column(name = "wei_count", nullable = true)
    public Integer getWeiCount() {
        return weiCount;
    }

    public void setWeiCount(Integer weiCount) {
        this.weiCount = weiCount;
    }

    @Basic
    @Column(name = "wei_discount", nullable = true, precision = 0)
    public Double getWeiDiscount() {
        return weiDiscount;
    }

    public void setWeiDiscount(Double weiDiscount) {
        this.weiDiscount = weiDiscount;
    }

    @Basic
    @Column(name = "wei_total", nullable = true, precision = 0)
    public Double getWeiTotal() {
        return weiTotal;
    }

    public void setWeiTotal(Double weiTotal) {
        this.weiTotal = weiTotal;
    }

    @Basic
    @Column(name = "cos_wei_total", nullable = true, precision = 0)
    public Double getCosWeiTotal() {
        return cosWeiTotal;
    }

    public void setCosWeiTotal(Double cosWeiTotal) {
        this.cosWeiTotal = cosWeiTotal;
    }

    @Basic
    @Column(name = "remark", nullable = true, length = 200)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WeiDetail weiDetail = (WeiDetail) o;
        return weiDetailId == weiDetail.weiDetailId &&
                Objects.equals(workordId, weiDetail.workordId) &&
                Objects.equals(productId, weiDetail.productId) &&
                Objects.equals(standard, weiDetail.standard) &&
                Objects.equals(weiPrice, weiDetail.weiPrice) &&
                Objects.equals(weiCount, weiDetail.weiCount) &&
                Objects.equals(weiDiscount, weiDetail.weiDiscount) &&
                Objects.equals(weiTotal, weiDetail.weiTotal) &&
                Objects.equals(cosWeiTotal, weiDetail.cosWeiTotal) &&
                Objects.equals(remark, weiDetail.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(weiDetailId, workordId, productId, standard, weiPrice, weiCount, weiDiscount, weiTotal, cosWeiTotal, remark);
    }
}
